<link rel="stylesheet" type="text/css" href="<?php echo base_url()?>templates/css/jquery-ui-1.8.23.custom.css">
<form name="frmEditOrderProduct" id="frmEditOrderProduct" action="<?php echo base_url("orders/save_order_product");?>">
    <table class="form" align="center">
        <tr>
            <td class="required label" style="width: 150px;">Mã sản phẩm </td>
            <td><input type="text" name="product_code" id="product_code" class="w250" value="<?php echo $order_product_item->product_code?>"></td>
        </tr> 
        <tr>
            <td class="required label" style="width: 150px;">Số lượng</td>
            <td><input type="text" name="quantity" id="quantity" class="w250" value="<?php echo $order_product_item->quantity?>"></td>
        </tr> 
        <tr>
            <td class="label">Giá</td>
            <td>
                <select name="type_price" id ="type_price" style="background:#ffffff;">
                    <option value="0" >Chọn loại giá bán</option>
                    <option value="1" <?php echo $order_product_item->type_price==1?"selected":''?>  >Giá lẻ</option>
                    <option value="2" <?php echo $order_product_item->type_price==2?"selected":''?> >Giá sỉ</option>
                </select>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center">
                <input type="hidden" name="order_product_id" value="<?php echo $order_product_id;?>" />
                <input type="hidden" name="order_id" value="<?php echo $order_product_item->order_id;?>" />
                <input type="button" name="bt_submit" value="" id="save_order_product" class="capnhat">
            </td>
        </tr>  
    </table>
</form>
<script type="text/javascript" src="<?php echo base_url()?>templates/js/jquery-ui-1.8.23.custom.min.js"></script>

 <script type="text/javascript">
  $(function() {
    var availableTags = [
      <?php if($product_items){
		  foreach($product_items as $product_item){ ?>
		  "<?php echo $product_item->code?>",
	<?	  }
	  }?>
    ];
    $( "#product_code" ).autocomplete({
      source: availableTags
    });
  });
  </script>